<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <p>测试标签</p>
        <p ref="pdom">测试ref</p>
        <input type="button" value="打印printRefs" @click="printRefs">
    </div>
</body>
<script>
    function User(){}
    User.prototype.arg="aaa";
    User.prototype.show=function(){};

    var u = new User();

    var vm = new Vue({
        el:"#app",
        data:{
            msg:"变量",
            info:"info"
        },
        computed: {
            getMsg(){
                console.log("vue的print方法");
            }
        },
        methods: {
            printRefs(){
                console.log(this.$refs.pdom);
            }
        },
    });

    console.log(vm);
    //获取vue实例对应的根容器
    console.log(vm.$el);
    //vue对$el添加了一个特殊指向__vue__，描述当前容器对应的vue实例
    console.log(vm.$el.__vue__);
    //获取当前实例的所有被监控的data数据变量
    console.log(vm.$data);
    
    console.log(vm.$options);
    
    console.log(vm.$refs);
    
</script>
</html>